package com.patttern.structural.bridge;

/**
 * @Author: root
 * @Date: 2018/11/22 9:44
 */
public abstract class Computer {
    protected Brand brand;

    public Computer(Brand brand) {
        this.brand = brand;
    }

    public void sale() {
        brand.sale();
    }
}

class LapTop extends Computer{

    public LapTop(Brand brand) {
        super(brand);
    }

    public void sale(){
        super.sale();
        System.out.println("销售LapTop............");
    }
}
class DeskTop extends Computer{

    public DeskTop(Brand brand) {
        super(brand);
    }

    public void sale(){
        super.sale();
        System.out.println("销售DeskTop............");
    }
}

class Mobile extends Computer{

    public Mobile(Brand brand) {
        super(brand);
    }

    public void sale(){
        super.sale();
        System.out.println("销售Mobile............");
    }
}
